package com.qf.device.controller;

import com.qf.device.Dto.CmdParamDto;
import com.qf.device.service.DeviceTopicService;
import com.qf.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 作者：WXH
 * 时间：2023/11/1
 * 描述：冲冲冲！！！
 */
@RestController
@RequestMapping("send")
@CrossOrigin
public class CmdController {
    @Autowired
    private DeviceTopicService deviceTopicService;
    @PostMapping("cmd")
    public R cmd(@RequestBody CmdParamDto cmdParamDto){

        return R.ok(deviceTopicService.sendCmd(cmdParamDto));
    }
}
